import request from '@/utils/request'

/**
 * 销售渠道佣金比例分页查询
 * @param {查询条件} data
 */
export function listLayChannel(query) {
  return request({
    url: 'business/LayChannel/list',
    method: 'get',
    params: query,
  })
}

/**
 * 新增销售渠道佣金比例
 * @param data
 */
export function addLayChannel(data) {
  return request({
    url: 'business/LayChannel',
    method: 'post',
    data: data,
  })
}
/**
 * 修改销售渠道佣金比例
 * @param data
 */
export function updateLayChannel(data) {
  return request({
    url: 'business/LayChannel',
    method: 'PUT',
    data: data,
  })
}
/**
 * 获取销售渠道佣金比例详情
 * @param {Id}
 */
export function getLayChannel(id) {
  return request({
    url: 'business/LayChannel/' + id,
    method: 'get'
  })
}

/**
 * 删除销售渠道佣金比例
 * @param {主键} pid
 */
export function delLayChannel(pid) {
  return request({
    url: 'business/LayChannel/delete/' + pid,
    method: 'POST'
  })
}
